package com.byit.mapper;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.byit.domain.SysRole;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 角色表 Mapper 接口
 * </p>
 *
 * @author wangx
 * @since 2018-12-11
 */
@Repository
public interface SysRoleMapper extends BaseMapper<SysRole> {

    List<String> getAuthUserRole(Long userId);

    void delRoleById(Map<String, Object> params);

    List<JSONObject> selectRoleList(Page<SysRole> pageInfo, Map<String, Object> params);

    Integer selectRoleByCode(String name);

    List<JSONObject> getRoleMap(@Param("companyId") Long companyId);

}